#ifndef ASPROJECTINFO_H
#define ASPROJECTINFO_H

#include <QWidget>
#include "ui_as_projectinfo.h"
#include "ASAbstractWidget.h"

class ASGViewWidget;
class QPage;
class ASQueryViewModel;
class ASProjectInfoWidget : public ASAbstractWidget
{
	Q_OBJECT

public:
	ASProjectInfoWidget(QWidget *parent);
	~ASProjectInfoWidget();

	void	initView();
	void	initModel();
	void	initDelegate();
	void	updatePageInfo();
	void	changeModel(const QString&,const QString &);

	virtual void registerToolBar(QWidget* pToolBar);
private:
	Ui::projectinfo		ui_proinfo;
	ASGViewWidget*		m_pGViewWidget;
	QWidget*			m_pBarWidget;
	QPage*				m_pPage;
	QString				m_strSQLCond;
	ASQueryViewModel*	m_pSqlTableModel;
	QStringList			m_headerLabels;

	int					m_nLastStartItem;
	bool				m_bForcusFresh;

protected slots:
	void			onSearchSampleIndxSlot();
	void			onRefreshInfoSlot();
	void			onTurnPageSlot(int,int);

	void			onModifyProjectInfo(QModelIndex);
	void			onDelProjectInfo(QModelIndex);
	void			onPreviewImg(QModelIndex);
};

#endif // ASPROJECTINFO_H
